<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>操作样式</title>
    <script src="js/jquery-3.6.0.min.js"type="text/javascript">
    </script>
    <style type="text/css">
    .baseClass{background-color: azure;}
    .focusClass{background-color: brown;border:2px dotted blue;}
    .inverseColor{color: chartreuse;background-color:black;}
    </style>
</head>
<body>
    <img src="imges/03.jpg" /><hr />
    <input type="button" value="放大图片" onClick="enlargeImage()"/>
    <input type="button" value="缩小图片" onClick="lessenImage()"/>
    <script type="text/javascript">
    function enlargeImage(){
        $("img").css({
            width:function(index,value){
                return parseFloat(value)*1.1;
            },
            height:function(index,value){
                return parseFloat(value)*1.1;
            }
        });
    }
    function lessenImage(){
        $("img").css({
            width:function(index,value){
                return parseFloat(value)*0.9;
            },
            height:function(index,value){
                return parseFloat(value)*0.9;
            }
        });
    }
    </script>
</body>
</html>